<?php
       $memberPointTypeId = $data['memberPointTypeId'] ;
       $accountIdField = $data['accountIdField']  + 20121212;
       $consumptionField = $data['consumptionField'] ;
       $operationPointField = $data['operationPointField'] ;
       $finalChargeField = $data['finalChargeField'] ;
       $finalPointField = $data['finalPointField'] ;
        ?>
<link rel="stylesheet" type="text/css"
      href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-datetimepicker.min.css" />
<script  type="text/javascript"
         src="<?php echo Yii::app()->request->baseUrl; ?>/js/bootstrap-datetimepicker.min.js"/>

<script type="text/javascript">
    $(document).ready(function() {
        $("#selectAll").click(function() {
            if ($(this).attr("checked") == "checked") {
                $(":checkbox").attr("checked", true);
            } else {
                $(":checkbox").attr("checked", false);
            }
        });

    });
</script> 

<script type="text/javascript">
    $(function() {
        $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
        $('.tree li.parent_li > span').on('click', function(e) {
            var children = $(this).parent('li.parent_li').find(' > ul > li');
            if (children.is(":visible")) {
                children.hide('fast');
                $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
            } else {
                children.show('fast');
                $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
            }
            e.stopPropagation();
        });
    });</script>
<script type="text/javascript">
    $(function() {
        $("#Event_Shop_CX").click(function() {
            document.getElementById("Event_Shop_CX_View").style.display = '';
            document.getElementById("Event_Clothes_CX_View").style.display = 'none';
        });
        $("#Event_Clothes_CX").click(function() {
            document.getElementById("Event_Shop_CX_View").style.display = 'none';
            document.getElementById("Event_Clothes_CX_View").style.display = '';
        });
    });</script>
<legend>
    <h4>
        <?php
        echo $control->getAjaxLink(array('name' => '功能列表', 'id' => 'showEventList'), array(
            'cooker' => 'BAEvent@showEventList'
        ));
        ?>\
        <?php
        echo $control->getAjaxLink(array('name' => '积分类型', 'id' => 'showMemberPointTypeList'), array(
            'cooker' => 'BAMemberPointCooker@showMemberPointTypeList'
        ));
        ?>\
        <?php
        echo $control->getAjaxLink(array('name' => '帐户列表', 'id' => 'showMemberPointAccountList'), array(
            'cooker' => 'BAMemberPoint@showMemberPointAccountList',
            'memberPointTypeId' => $memberPointTypeId
        ));
        ?>\
        <?php echo '积分历史'; ?>

    </h4>
</legend>

<div>
    <fieldset>
        <table class="table table-hover">
            <colgroup>
                <col class="span2">
                <col class="span6">
                <col class="span2">
            </colgroup>
            <thead>
                <tr>
                    <th><?php echo '属性'; ?></th>
                    <th><?php echo '内容'; ?></th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        <?php echo '会员卡号'; ?>
                    </td>
                    <td>
                        <?php
                        echo $accountIdField;
                        ?>
                        <!--                    &nbsp;&nbsp;&nbsp;&nbsp;<a id="CreateNewType_clink" role="button" data-toggle="modal" class="btn disabled" style="font-size: 12px;margin-top: -12px;">创建新类型</a>-->
                    </td>
                </tr>                
        <!--        <tr><td> <?php echo '操作类型'; ?> </td>
                    <td>
                        <?php
        //                echo CHtml::activeDropDownList($model, $operationTypeField, array('1'=>'增加', '2'=>'扣除'), array('class' => 'span4', 'placeholder' => 'default is add',  'required' => true));
                        ?>
                    </td>
                </tr>-->
                <tr><td> <?php echo '折扣前金额'; ?> </td>
                    <td>
                        <?php
                        echo $consumptionField;
                        ?>
                    </td>
                </tr>        
                <tr><td> <?php echo '兑换点数'; ?> </td>
                    <td>
                        <?php
                        echo $operationPointField;
                        ?>
                    </td>
                </tr>
                <tr><td> <?php echo '最终收费金额'; ?> </td>
                    <td>
                        <?php
                        echo $finalChargeField;
                        ?>
                    </td>
                </tr>
                <tr>
                    <td>
                        <?php echo '最终积分'; ?>
                    </td>
                    <td>
                        <?php
                        echo $finalPointField;
                        ?>
                        <!--                    &nbsp;&nbsp;&nbsp;&nbsp;<a id="CreateNewType_clink" role="button" data-toggle="modal" class="btn disabled" style="font-size: 12px;margin-top: -12px;">创建新类型</a>-->
                    </td>
                </tr>
            </tbody>
        </table>
        
        <div>
            <?php
            echo $control->getAjaxLink(array('name' => '返回', 'id' => 'showMemberPointAccountList'), array(
            'cooker' => 'BAMemberPoint@showMemberPointAccountList',
            'memberPointTypeId' => $memberPointTypeId
             ));
            ?>
        </div>
</div>

